//
//  CustomController.m
//  LiquorChain
//
//  Created by apple on 2019/1/7.
//  Copyright © 2019年 王冬. All rights reserved.
//

#import "CustomController.h"

@interface CustomController ()

@end

@implementation CustomController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationController.navigationBar.hidden = YES;
    self.automaticallyAdjustsScrollViewInsets = NO;
    [self setupNavBar];
   
}

- (void)setupNavBar
{
    [self.view addSubview:self.customNavBar];
    
    // 设置自定义导航栏背景图片
   // self.customNavBar.barBackgroundImage = [UIImage imageNamed:@"millcolorGrad"];
    
    // 设置自定义导航栏标题颜色
    self.customNavBar.titleLabelColor = [UIColor whiteColor];
    //[self.customNavBar wr_setLeftButtonWithNormal:[UIImage imageNamed:@"you"] highlighted:[UIImage imageNamed:@"you"]];
    if (self.navigationController.childViewControllers.count != 1) {
       // [self.customNavBar wr_setLeftButtonWithTitle:@"<" titleColor:[UIColor whiteColor]];
         [self.customNavBar wr_setLeftButtonWithNormal:[UIImage imageNamed:@"left"] highlighted:[UIImage imageNamed:@"left"]];
        
    }
}

- (WRCustomNavigationBar *)customNavBar
{
    if (_customNavBar == nil) {
        _customNavBar = [WRCustomNavigationBar CustomNavigationBar];
    }
    return _customNavBar;
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    //self.navigationController.navigationBar.barTintColor = [UIColor whiteColor];
    
}



@end
